home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Message Dialogs / alert-confirm-gen.izs < prev    next >
Text File  |  2005-09-27  |  9KB  |  242 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Alert and Confirm Generator
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION> Use this script to create quick and easy alert and confirmation scripts. Pick what you want, enter your text and get the source code.
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>Messages<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13.  
  14.  
  15. <!-- HOW TO INSTALL ALERT AND CONFIRM GENERATOR:
  16.  
  17.   1.  Copy code into the HEAD section of document
  18.   2.  Put last coding into the BODY section of document  -->
  19.  
  20. <!-- STEP ONE: Add code into HEAD section of document  -->
  21.  
  22. <HEAD>
  23.  
  24. <SCRIPT LANGUAGE="JavaScript">
  25.  
  26.  
  27. <!-- Begin
  28. // alert('    Welcome to JavaScripter, a quick and easy script writing tool.  This is BETA 1.01 so it has very few options. We will be adding more complicated ones soon, so drop by again sometime.  If you want to place JavaScripter on your site just ask at jaalibbrandl@hotmail.com or copy-paste it from here. But please leave in the short notes that mention J2 (Including this little message).  Thanks!                                   -J2')
  29. // HTML for Alert Maker
  30. var alt = ('<center><b>Alert Maker</b><br><form name=alrt>Alert Text: <input type="text" name="txt" size="20" maxlength="200"><br><input type="button" onclick="makealrt()" value="Make It!"></form></center>')
  31. // HTML for Confirm Maker
  32. var err = ('Error!')
  33. // Function gets value and puts in HTML for that creation routine
  34. function begin() {
  35. pick = document.sw.select.value
  36. if (pick<=1) {
  37. document.all.myspan.innerHTML = (alt)
  38. }
  39. else {
  40. document.all.myspan.innerHTML = ('<form name=upso><select name=ipso><option value=1>Enter-Back<option value=2>Link-Stay</select><br><input type=button value=Go onclick=epso()></form>')
  41. }
  42.  
  43. }
  44. // Function to figure out what confirm to do
  45. function epso() {
  46. var jpg = document.upso.ipso.value
  47. if (jpg<=1) {
  48. document.all.myspan.innerHTML = ('<form name=iso>Confirm Text:<input type=text name=aso size=20 maxlength=40 value=Enter?><br><input type=button value=Make! onclick=jojo()></form>')
  49. }
  50. else {
  51. document.all.myspan.innerHTML = ('<form name=isop>Confirm Text:<input type=text name=asop size=20 maxlength=40 value=Jump?><br>Link:<input type=text name=ksop size=20 maxlength=40 value=where.com><br><input type=button value=Make! onclick=nojo()></form>')
  52. }
  53. }
  54. // Function to put out confirm enter-back
  55. function jojo() {
  56. var itall = document.iso.aso.value
  57. var prtone = ('<script>var answer=confirm("')
  58. var prttwo = ('")')
  59. var prta = ('if (answer) {')
  60. var prtb = ('document.write("");')
  61. var prtc = ('}')
  62. var prtd = ('else {')
  63. var prte = ('history.go(-1);')
  64. var prtf = ('}')
  65. var prtg = ('</script>')
  66. var tail = ('</textarea>')
  67. var br = ('<br>')
  68. alert("The next window will be your confirm.");
  69. confirm(""+itall)
  70. document.all.myspan.innerHTML = ('<center>Insert the text below into your HTML to make the confirm. Do NOT remove breaks.</center><br>'+prtone+itall+prttwo+br+prta+br+prtb+br+prtc+br+prtd+br+prte+br+prtf+br+prtg+br+tail)
  71. }
  72. // Function to put out confirm link-stay
  73. function nojo() {
  74. var nox = document.isop.asop.value
  75. var cox = document.isop.ksop.value
  76. var prtone = ('<script>var answer=confirm("')
  77. var prttwo = ('")')
  78. var prta = ('if (answer) {')
  79. var prtb = ('window.location("')
  80. var prtbb = ('");')
  81. var prtc = ('}')
  82. var prtd = ('else {')
  83. var prte = ('document.write("");')
  84. var prtf = ('}')
  85. var prtg = ('</script>')
  86. var tail = ('</textarea>')
  87. var br = ('<br>')
  88. alert("The next window will be your confirm.");
  89. confirm(""+nox)
  90. document.all.myspan.innerHTML = ('<center>Insert the text below into your HTML to make the confirm. Do NOT remove breaks.</center><br>'+prtone+nox+prttwo+br+prta+br+prtb+cox+prtbb+br+prtc+br+prtd+br+prte+br+prtf+br+prtg+br+tail)
  91. }
  92. //Function to put out alert text
  93. function makealrt() {
  94. var goose = document.alrt.txt.value
  95. alert("The next alert will be what yours will look like.");
  96. alert(goose);
  97. var prtone = ('<script>alert("')
  98. var prttwo = ('")</script>')
  99. var tail = ('</textarea>')
  100. document.all.myspan.innerHTML = ('<center>Insert the text below into your HTML to make the alert.<br><textarea name=name rows=10 cols=40>'+prtone+goose+prttwo+tail)
  101. }
  102. //  End -->
  103. </script>
  104.  
  105. </HEAD>
  106.  
  107. <!-- STEP TWO: Add code into BODY section of document  -->
  108.  
  109. <BODY>
  110.  
  111. <center><b>JavaScripter</b></center><hr>
  112. <span id="myspan">
  113. <form name="sw">
  114. <center><select name="select">
  115. <option value="1">Alert Maker
  116. <option value="2">Confirm Maker
  117. </select>
  118. <input type="button" onclick="begin()" value="Go!"></center></span>
  119. </form>
  120.  
  121.  
  122. <!-- END OF SCRIPT -->
  123. <!/SCRIPT>
  124.  
  125. <!PREVIEW>
  126. <!-- START OF SCRIPT -->
  127.  
  128.  
  129.  
  130. <!-- HOW TO INSTALL ALERT AND CONFIRM GENERATOR:
  131.  
  132.   1.  Copy code into the HEAD section of document
  133.   2.  Put last coding into the BODY section of document  -->
  134.  
  135. <!-- STEP ONE: Add code into HEAD section of document  -->
  136.  
  137. <HEAD>
  138.  
  139. <SCRIPT LANGUAGE="JavaScript">
  140.  
  141.  
  142. <!-- Begin
  143. // alert('    Welcome to JavaScripter, a quick and easy script writing tool.  This is BETA 1.01 so it has very few options. We will be adding more complicated ones soon, so drop by again sometime.  If you want to place JavaScripter on your site just ask at jaalibbrandl@hotmail.com or copy-paste it from here. But please leave in the short notes that mention J2 (Including this little message).  Thanks!                                   -J2')
  144. // HTML for Alert Maker
  145. var alt = ('<center><b>Alert Maker</b><br><form name=alrt>Alert Text: <input type="text" name="txt" size="20" maxlength="200"><br><input type="button" onclick="makealrt()" value="Make It!"></form></center>')
  146. // HTML for Confirm Maker
  147. var err = ('Error!')
  148. // Function gets value and puts in HTML for that creation routine
  149. function begin() {
  150. pick = document.sw.select.value
  151. if (pick<=1) {
  152. document.all.myspan.innerHTML = (alt)
  153. }
  154. else {
  155. document.all.myspan.innerHTML = ('<form name=upso><select name=ipso><option value=1>Enter-Back<option value=2>Link-Stay</select><br><input type=button value=Go onclick=epso()></form>')
  156. }
  157.  
  158. }
  159. // Function to figure out what confirm to do
  160. function epso() {
  161. var jpg = document.upso.ipso.value
  162. if (jpg<=1) {
  163. document.all.myspan.innerHTML = ('<form name=iso>Confirm Text:<input type=text name=aso size=20 maxlength=40 value=Enter?><br><input type=button value=Make! onclick=jojo()></form>')
  164. }
  165. else {
  166. document.all.myspan.innerHTML = ('<form name=isop>Confirm Text:<input type=text name=asop size=20 maxlength=40 value=Jump?><br>Link:<input type=text name=ksop size=20 maxlength=40 value=where.com><br><input type=button value=Make! onclick=nojo()></form>')
  167. }
  168. }
  169. // Function to put out confirm enter-back
  170. function jojo() {
  171. var itall = document.iso.aso.value
  172. var prtone = ('<script>var answer=confirm("')
  173. var prttwo = ('")')
  174. var prta = ('if (answer) {')
  175. var prtb = ('document.write("");')
  176. var prtc = ('}')
  177. var prtd = ('else {')
  178. var prte = ('history.go(-1);')
  179. var prtf = ('}')
  180. var prtg = ('</script>')
  181. var tail = ('</textarea>')
  182. var br = ('<br>')
  183. alert("The next window will be your confirm.");
  184. confirm(""+itall)
  185. document.all.myspan.innerHTML = ('<center>Insert the text below into your HTML to make the confirm. Do NOT remove breaks.</center><br>'+prtone+itall+prttwo+br+prta+br+prtb+br+prtc+br+prtd+br+prte+br+prtf+br+prtg+br+tail)
  186. }
  187. // Function to put out confirm link-stay
  188. function nojo() {
  189. var nox = document.isop.asop.value
  190. var cox = document.isop.ksop.value
  191. var prtone = ('<script>var answer=confirm("')
  192. var prttwo = ('")')
  193. var prta = ('if (answer) {')
  194. var prtb = ('window.location("')
  195. var prtbb = ('");')
  196. var prtc = ('}')
  197. var prtd = ('else {')
  198. var prte = ('document.write("");')
  199. var prtf = ('}')
  200. var prtg = ('</script>')
  201. var tail = ('</textarea>')
  202. var br = ('<br>')
  203. alert("The next window will be your confirm.");
  204. confirm(""+nox)
  205. document.all.myspan.innerHTML = ('<center>Insert the text below into your HTML to make the confirm. Do NOT remove breaks.</center><br>'+prtone+nox+prttwo+br+prta+br+prtb+cox+prtbb+br+prtc+br+prtd+br+prte+br+prtf+br+prtg+br+tail)
  206. }
  207. //Function to put out alert text
  208. function makealrt() {
  209. var goose = document.alrt.txt.value
  210. alert("The next alert will be what yours will look like.");
  211. alert(goose);
  212. var prtone = ('<script>alert("')
  213. var prttwo = ('")</script>')
  214. var tail = ('</textarea>')
  215. document.all.myspan.innerHTML = ('<center>Insert the text below into your HTML to make the alert.<br><textarea name=name rows=10 cols=40>'+prtone+goose+prttwo+tail)
  216. }
  217. //  End -->
  218. </script>
  219.  
  220. </HEAD>
  221.  
  222. <!-- STEP TWO: Add code into BODY section of document  -->
  223.  
  224. <BODY>
  225.  
  226. <center><b>JavaScripter</b></center><hr>
  227. <span id="myspan">
  228. <form name="sw">
  229. <center><select name="select">
  230. <option value="1">Alert Maker
  231. <option value="2">Confirm Maker
  232. </select>
  233. <input type="button" onclick="begin()" value="Go!"></center></span>
  234. </form>
  235.  
  236.  
  237.  
  238. <!-- END OF SCRIPT -->
  239. <!/PREVIEW>
  240.  
  241. <!RELATED>NONE<!/RELATED>
  242.